import http from '@/config'

/**
 * 登录接口
 * @param params
 * @returns {*}
 */
export function login(params) {
    return http({
        url: "/sso/student/accountLogin",
        method: "post",
        params
    })
}

/**
 * 封面上传接口
 * @param data
 * @returns {*}
 */
export function uploadCover(data) {
    return http({
        url: "/common/file/uploadShort/vod_img",
        method: "post",
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        data
    })
}

/**
 * 上传视频接口/修改作品
 * @param data
 * @returns {*}
 */
export function uploadStudentCover(data) {
    return http({
        url: "/vod/tutorial/saveStudent",
        method: "post",
        data
    })
}

/**
 * 根据学生Id查询视频列表接口
 * @param params
 * @returns {*}
 */
export function getVideolListById(params) {
    return http({
        url: "/vod/tutorial/searchStudentVod",
        method: "get",
        params
    })
}

/**
 * 根据ID删除视频
 * @param data
 * @returns {*}
 */
export function remove(data) {
    return http({
        url: "/vod/tutorial/remove",
        method: "post",
        data
    })
}
/**
 * 获取学生信息【适用于单独上传时 （非竞赛上传）】
 * @param params
 * @returns {*}
 */
export function getStudentInfo(params) {
    return http({
        url: "/user/stStudentAccount/findAccount",
        method: "get",
        params
    })
}

/**
 * 获取上传视频token
 */
export function getUpToken(params) {
    return http({
        url: "/common/file/getUpToken",
        method: "get",
        params
    })
}

